package com.atdel.demo01;

/**
 * @BelongsProject: java_study
 * @BelongsPackage: com.atdel.demo
 * @Author: Del
 * @CreateTime: 2025-03-03  11:54
 * @Description: 钢琴类
 * @Version: 1.0
 */
public class Piano extends Instrument {
    public Piano(String name) {
        setName(name); // 设置乐器名称
    }

    @Override
    void play() {
        System.out.println(getName() + " is playing ding ding ding");
    }
}